import React, { Component } from 'react'
//引入antd-mobile组件
import { NavBar, Icon } from 'antd-mobile'
//引入路由装饰器
import { withRouter } from 'react-router-dom'
//引入css
class TextHeader extends Component {
    render() {
        return (
            <NavBar
                mode="dark"
                icon={<Icon type="left" />}
                onLeftClick={() => { window.history.back(-1); }}
                rightContent={[
                    this.props.children
                ]}
            >{this.props.title}</NavBar>
        )
    }
}
export default withRouter(TextHeader)